﻿using CommandLine;

namespace ExcelToJson
{
    /// <summary>
    /// 命令行参数定义
    /// </summary>
    public sealed class Options
    {
        [Option('e', "excel", Required = true, HelpText = "输入的Excel文件路径.")]
        public IEnumerable<string>? ExcelPath { get; set; } = default;

        [Option('j', "json", Required = true, HelpText = "指定输出的json文件路径.")]
        public string JsonPath { get; set; } = String.Empty;

        [Option('h', "header", Required = true, HelpText = "表格中有几行是表头.")]
        public int HeaderRows { get; set; } = 4;

        [Option('p', "csharp", Required = false, HelpText = "指定输出的C#数据定义代码文件路径.")]
        public string CSharpPath { get; set; } = String.Empty;

        [Option('k', "csharppackage", Required = false, HelpText = "指定csharp的Package.")]
        public string CSharpPackage { get; set; } = "ExcelToJson";

        [Option('f', "platform", Required = false, HelpText = "client/server")]
        public string Platform { get; set; } = "client";

        [Option('c', "encoding", Required = false, HelpText = "指定编码的名称.")]
        public string Encoding { get; set; } = "utf8-nobom";

        [Option('l', "lowcase", Required = false, HelpText = "字段名称自动转换为小写")]
        public bool Lowcase { get; set; } = false;

        [Option('v', "java", Required = false, HelpText = "指定输出的java数据定义代码文件路径.")]
        public string JavaPath { get; set; } = String.Empty;

        [Option('g', "javapackage", Required = false, HelpText = "指定Java的Package.")]
        public string JavaPackage { get; set; } = String.Empty;

        [Option('i', "javaimport", Required = false, HelpText = "指定Java的import.")]
        public string javaImport { get; set; } = String.Empty;

        [Option('s', "sql", Required = false, HelpText = "指定输出的SQL文件路径.")]
        public string SQLPath { get; set; } = String.Empty;
    }
}